Skip to content

feat(‎crypto/grsa): Add RSA encryption and decryption function#4571

Merged
hailaz merged 13 commits intogogf:masterfrom
LanceAdd:feature/rsa
Dec 26, 2025
Merged

feat(‎crypto/grsa): Add RSA encryption and decryption function#4571
hailaz merged 13 commits intogogf:masterfrom
LanceAdd:feature/rsa

Conversation

@LanceAdd
Copy link
Member

@LanceAdd LanceAdd commented Dec 22, 2025

补充RSA加密解密功能
This pull request improves documentation and developer onboarding for the project, with a particular focus on the RSA cryptography package and general installation instructions. The main changes include the addition of a comprehensive README for the grsa RSA package, updated installation steps in both English and Chinese documentation, and minor clarifications to documentation links.

Documentation improvements:

  • Added a detailed README.md for the crypto/grsa package, including features, security considerations, usage examples, API descriptions, key format explanations, and error handling guidance.
  • Updated the English (README.MD) and Chinese (README.zh_CN.MD) documentation to include a clear installation section with go get instructions for easier onboarding. [1] [2]
  • Clarified and improved documentation links in both English and Chinese README files, including the addition of a link to the documentation source and improved naming for the GoDoc/Go package documentation. [1] [2]

Developer tooling:

  • Added a commented-out go install command for golangci-lint in the Makefile to assist developers in setting up linting tools.

@hailaz hailaz changed the title feat(crypto): Add RSA encryption and decryption function feat(‎crypto/grsa): Add RSA encryption and decryption function Dec 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive RSA encryption/decryption package to the GoFrame framework, providing support for both PKCS#1 and PKCS#8 key formats with base64 encoding capabilities.

  • Implements RSA key pair generation in both PKCS#1 and PKCS#8 formats
  • Provides encryption/decryption functions with format auto-detection and format-specific variants
  • Includes comprehensive test suite and detailed documentation with usage examples

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.

File Description
crypto/grsa/grsa.go Core implementation with 377 lines including key generation, encryption/decryption functions for both PKCS formats, and utility functions
crypto/grsa/grsa_z_unit_test.go Test suite covering key generation, encryption/decryption, format detection, and base64 operations
crypto/grsa/README.md Comprehensive package documentation with feature overview, usage examples, and API reference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hailaz hailaz merged commit cb4681c into gogf:master Dec 26, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants